<%-- 
    Document   : addMag
    Created on : Feb 25, 2012, 2:26:44 AM
    Author     : Hiroroi
--%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@page import="DBConnection.ConnectionFactory"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Add Magazine</title>
        
        <link rel = "stylesheet" href= "main.css" type="text/css"/>
        <link rel = "stylesheet" href= "menu.css" type="text/css"/>
        <link rel = "stylesheet" href= "loginreg.css" type="text/css"/>
    </head>
    <body>
        <%
        String remoteAdd = request.getRemoteAddr();
        String Address = (String)session.getAttribute("IPAdd");
        String username = (String)session.getAttribute("username");
        
        if((String)session.getAttribute("username")== null)
            response.sendRedirect("home.jsp");
        else if((String)session.getAttribute("userType")== "3")
            {
            response.sendRedirect("acctMgrHomePage.jsp");
            }
        else if((String)session.getAttribute("userType")== "1")
            {
            response.sendRedirect("adminIndex.jsp");
            }
        else if((String)session.getAttribute("userType")== "4")
            {
            response.sendRedirect("userHomePage.jsp");
            }
        else{
        
        out.print("Hello ");
        out.print(username);
        }
        %>
        
       <%--header--%>
        <div id="header">
           
        </div>
        <%--header--%>
        
        
        <%--menu--%>
        <div id="tabs24">   
             <ul>          
                <li><a href="addBook.jsp" >Add Books</a></li>
                <li><a href="addMag.jsp" >Add Magazines</a></li>
                <li><a href="addCd.jsp">Add CDs</a></li>
                <li><a href="addDvd.jsp">Add DVDs</a></li>
             </ul>   
        </div>
        <%--menu--%>
        
        <div class="wrapper">
        <%--centercontent--%>
        
        <div id="center">
           
            <label>Add Magazine</label>
            <br>
            <form class="LogForm"name ="addMag" method ="post" action="addMagAction.jsp">
            Magazine Title: <input type ="text" name ="magTitle"><br>
            Date Published: <input type ="text" name="magDate"><br>
            Volume No: <input type="number" name ="magVol"><br>
            Issue No: <input type="number" name ="magIssue"><br>
            Synopsis: <input type="text" name="synopsis"><br>
            Price: <input type="text" name="price"><br>
            <input type="submit" name="submit" value ="Add"/>
            
           </div>
        </div>
       <%--centercontent--%>
        
        <div class="clear"></div>
       <%-- footer --%>
        <div id="footer">
             <a style=" margin-right: 20px; font-family: arial;float: right; color:white"href="adminLogout.jsp">Log Out</a>
        </div>
        <%-- footer --%>
        
    </body>
</html>







